package com.demo.mb;

import com.jfinal.kit.StringKit;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;

import java.util.List;

@SuppressWarnings("serial")
public class WxMbsx extends Model<WxMbsx>{
    public static final WxMbsx dao = new WxMbsx();

    //columns START
    private String ID = "id";  //主键
    private String MBBH = "mbbh";  //物品编号
    private String MBSX= "mbsx";  //
    private String LBID = "lbid";  //模板类别id
    private String DSPORDER = "dsporder";  //排序
    private String BZ = "bz";  //备注
    private String STYLE="style";//样式
    private String TYPE="type";//类型
    private String NR="nr";//内容
    private String URL="url";//路径
    private String COLOR="color";//字体颜色
    private String TX="tx";//图片特效
    private String YC="yc";//延迟
    public void setId(int value) {
        set(ID, value);
    }

	public int getId() {
		return get(ID);
	}
   
    public void setLbid(String value) {
        set(LBID, value);
    }

	public String getLbid() {
		return get(LBID);
	}
    public void setDsporder(int value) {
        set(DSPORDER, value);
    }

	public int getDsporder() {
		return get(DSPORDER);
	}
    
    public void setBz(String value) {
        set(BZ, value);
    }

	public String getBz() {
		return get(BZ);
	}
	public String getURL() {
		return URL;
	}

	public void setURL(String uRL) {
		URL = uRL;
	}

	public String getNR() {
		return NR;
	}

	public void setNR(String nR) {
		NR = nR;
	}

	public String getTYPE() {
		return TYPE;
	}

	public void setTYPE(String tYPE) {
		TYPE = tYPE;
	}

	public String getSTYLE() {
		return STYLE;
	}

	public void setSTYLE(String sTYLE) {
		STYLE = sTYLE;
	}

	public String getMBSX() {
		return MBSX;
	}

	public void setMBSX(String mBSX) {
		MBSX = mBSX;
	}

	public String getMBBH() {
		return MBBH;
	}

	public void setMBBH(String mBBH) {
		MBBH = mBBH;
	}

	public String getCOLOR() {
		return COLOR;
	}

	public void setCOLOR(String cOLOR) {
		COLOR = cOLOR;
	}

	public String getTX() {
		return TX;
	}

	public void setTX(String tX) {
		TX = tX;
	}

	public String getYC() {
		return YC;
	}

	public void setYC(String yC) {
		YC = yC;
	}

	
   
    public List<WxMbsx> findAll() {
        return find("select * from wx_mbsx");
    }

    public Page<WxMbsx> page(int pageNumber, int pageSize, String where) {
        String sqlExp = "from wx_mbsx";
        if(StringKit.notBlank(where)){
            sqlExp += " where " + where;
        }
        String order=" order by dsporder asc";
        return paginate(pageNumber, pageSize, "select *", sqlExp+order);
    }

}

